package frobagroup.utils;

import com.google.gson.Gson;

import java.lang.reflect.Type;

/**
 * Created by Tinsley on 2016/9/22.
 */
public class GsonUtils {

    public static <T> T fromJsonToCollection(Object obj,Type listType){
        Gson gson = new Gson();
        String gsonStr = gson.toJson(obj);
        return gson.fromJson(gsonStr,listType);
    }

}
